package com.cskaoyan.catmall.dao;

import com.cskaoyan.catmall.model.bo.WxGoodsListBo;
import com.cskaoyan.catmall.model.pojo.MarketGoods;
import com.cskaoyan.catmall.model.pojo.MarketGoodsExample;
import com.cskaoyan.catmall.model.vo.WxGoodsVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MarketGoodsMapper {
    long countByExample(MarketGoodsExample example);

    int deleteByExample(MarketGoodsExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketGoods record);

    int insertSelective(MarketGoods record);

    List<MarketGoods> selectByExampleWithBLOBs(MarketGoodsExample example);

    List<MarketGoods> selectByExample(MarketGoodsExample example);

    MarketGoods selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByExampleWithBLOBs(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByExample(@Param("record") MarketGoods record, @Param("example") MarketGoodsExample example);

    int updateByPrimaryKeySelective(MarketGoods record);

    int updateByPrimaryKeyWithBLOBs(MarketGoods record);

    int updateByPrimaryKey(MarketGoods record);

    int selectCount();

    int selectDuplicateGoods(@Param("goodsSn") String goodsSn, @Param("name") String name);

    int selectDuplicateGoodsByName(String name);


    List<MarketGoods> selectAllGoods();


    List<WxGoodsVo.ListDTO> selectGoodsByCategoryId(Integer categoryId);

    int selectGoodsCount();

    List<WxGoodsVo.ListDTO> selectGoodsByBrandId(Integer brandId);

    List<Integer> selectCategoryIdsByBrandId(Integer brandId);

    int selectCategoryIdById(Integer id);

    List<WxGoodsVo.ListDTO> selectGoodsSelective(WxGoodsListBo goodsListBo);

    List<Integer> selectCategoryIdsSelective( WxGoodsListBo goodsListBo);
}